extends usercenter/base.html
block content
	.col-md-3 &nbsp;
	.col-md-6
		.hidden-xs.alert.alert-success.text-center
			p
				h5 登录
		.well
			form#login-form.form-horizontal(role='form',action='.',method='post')
				| {% csrf_token %}
				.form-group(class='{% if form.errors %}error{% endif %}')
					label.share-label.col-sm-2(for='id_captcha') 验证码
					#CAPTCHA.col-sm-10(data-url="{% url 'captcha-refresh' %}")
						| {{form.captcha}}
				.form-group(class='{% if form.errors %}error{% endif %}')
					label.share-label.col-sm-2(for='id_username') 用户名
					.col-sm-10
						input#id_username.form-control(maxlength='254', name='username', type='text')
				.form-group(class='{% if form.errors %}error{% endif %}')
					label.share-label.col-sm-2(for='id_password') 密码
					.col-sm-10
						input#id_password.form-control(name='password', type='password')
				input(type='hidden', name='this_is_the_login_form', value='1')
				input(type='hidden', name='next', value='{{ next }}')
				button#login.btn.btn-large.btn-primary.btn-block(type='submit') 登录
				if form.errors
					.alert.alert-danger.text-center
						if form.captcha.errors
							p 验证码错误
						else
							p 用户名或密码错误
		.hidden-xs.text-center(style='margin-bottom: 20px;')
			a(href="{% url 'password_reset' %}") 找回密码
	.col-md-3 &nbsp;
